package com.ihrm.company.vo;

import com.ihrm.domain.company.Company;
import com.ihrm.domain.company.Department;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author chahua
 * @date 2022/3/27 13:12
 **/
@Data
public class DeptListVo implements Serializable {
    /**
     * 响应数据：
     * {
     *   "code": 0,
     *   "success": true,
     *   "message": "string",
     *   "data": {
     *     "companyId": "string",
     *     "companyName": "string",
     *     "companyManage": "string",
     *     "depts": [
     *       {
     *         "id": "string",
     *         "companyId": "string",
     *         "parentId": "string",
     *         "name": "string",
     *         "code": "string",
     *         "introduce": "string",
     *         "manager": "string"
     *       }
     *     ]
     *   }
     * }
     */

    private String companyId;
    private String companyName;
    private String companyManage;
    private List<Department> depts;

    public DeptListVo(Company company,List depts) {
        this.companyId = company.getId();
        this.companyName = company.getName();
        this.companyManage = company.getLegalRepresentative();
        this.depts = depts;
    }
}
